from datetime import datetime
from typing import Optional, List

from pydantic import BaseModel


class ServicesQuery(BaseModel):
    userName: str
    password: str
    env: str
    reFlush: Optional[bool] = None


class ServiceInfo(BaseModel):
    serviceCode: str
    serviceId: str
    itemId: str
    run: bool
    lastTag: str


class BuildInfo(BaseModel):
    userName: str
    serviceList: List[ServiceInfo]
